﻿
using FluentValidation;

namespace IdentityService.WebAPI.Controllers.Login.Request;
public record LoginByPhoneAndPwdRequest(string PhoneNum, string Password);
public class LoginByPhoneAndPwdRequestValidator : AbstractValidator<LoginByPhoneAndPwdRequest>
{
    public LoginByPhoneAndPwdRequestValidator()
    {
        RuleFor(e => e.PhoneNum)
            .NotNull().WithMessage("手机号码不能为空")
            .NotEmpty().WithMessage("手机号码不能为空");
        RuleFor(e => e.Password)
            .NotNull().WithMessage("密码不能为空")
            .NotEmpty().WithMessage("密码不能为空");
    }
}